package main

import (
	"github.com/go-vgo/robotgo"
	"os/exec"
)

func main() {
	// 打开前先关闭浏览器所有窗口
	close := exec.Command("cmd", "/c", "TASKKILL  /F /T /IM  chrome.exe")
	close.Run()

	//打开浏览器
	//外网版本
	//datapath := "http://116.236.11.6:8082"
	//内网版本
	datapath := "http://116.236.11.6:8102"
	cmd := exec.Command("cmd", "/c", "start "+datapath)
	cmd.Run()
	//执行显示器切换,中间延迟3秒
	robotgo.Sleep(3)
	robotgo.KeyTap("a", "ctrl", "cmd")
	//浏览器全屏显示
	robotgo.KeyTap("f11")
}
